package com.example.shixunandjavagotoyangchen.BoosYang.Day003.Day003_FX3;

import android.widget.ImageView;

import com.bumptech.glide.Glide;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.viewholder.BaseViewHolder;
import com.example.shixunandjavagotoyangchen.R;

import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

import java.util.List;

/**
 * 作者:二徒
 * 时间：2021/11/4- 11:26
 * 功能实现：
 */
public class XingdongAdpter2 extends BaseQuickAdapter<XingdongBean.DataBean, BaseViewHolder>{


    public XingdongAdpter2(@Nullable List<XingdongBean.DataBean> data) {
        super(R.layout.communitydapao, data);
    }

    @Override
    protected void convert(@NotNull BaseViewHolder baseViewHolder, XingdongBean.DataBean dataBean) {
        Glide.with(getContext()).load(dataBean.getVideomainimg()).into((ImageView) baseViewHolder.getView(R.id.communityXML_img1));
        Glide.with(getContext()).load(dataBean.getHeadpath()).circleCrop().into((ImageView) baseViewHolder.getView(R.id.communityXML_img2));
        baseViewHolder.setText(R.id.communityXML_text1,dataBean.getCaption());
        baseViewHolder.setText(R.id.communityXML_text2,dataBean.getAuthname());
    }
}
